/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       dialog_charm.h

	$Header: /game/dialog_charm.h $

	$NoKeywords: $

 ************************************************************************/

#ifndef DIALOG_CHARM_H_INCLUDED
#define DIALOG_CHARM_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_group_ptr.h"
#include "game_window.h"

class t_button;
class t_creature_array;
enum  t_skill_mastery;

// ---------------------------------------------------------
// dialog to handle pre-combat charms
// ---------------------------------------------------------
class t_dialog_charm : public t_window
{
public:
	enum t_result
	{
		k_result_cancel,
		k_result_charm,
		k_result_diplomacy
	};

	t_dialog_charm( t_creature_array const& diplomacy_creatures,
					t_creature_array const& charm_creatures,
					t_skill_mastery			diplomacy,
					t_skill_mastery			charm,
					int						funds,
					t_window*				parent );

	int get_diplomacy_cost() const;
protected:
	void add_creatures( t_window* background, t_screen_point const& origin,
						t_creature_array const& creatures, std::string const& layer_name );
	void buy_clicked( t_button* );
	void close_clicked( t_button* );
	void ok_clicked( t_button* );
	void set_charm( t_window* background, t_screen_point const& origin,
					t_creature_array const& charm_creatures, t_skill_mastery charm,
					bool has_diplomacy );
	void set_diplomacy( t_window* background, t_screen_point const& origin,
						t_creature_array const& diplomacy_creatures, 
						t_skill_mastery			diplomacy, int funds,
						bool has_charm );
	void set_primary_text( t_window* background, t_screen_point const& origin,
						   t_creature_array const& diplomacy_creatures,
						   t_creature_array const& charm_creatures );

	t_bitmap_group_ptr m_bitmaps;
	int				   m_diplomacy_cost;
};

inline int t_dialog_charm::get_diplomacy_cost() const
{
	return m_diplomacy_cost;
}

#endif